#include"tcp_server.hpp"
#include<memory>

using namespace std;
using namespace tcp_server;

static void  USING(string proc)
{
    cout<<"Usage:\n\t "<< proc<<"proc\n"<<endl;
}

string echo(const string &message)
{
    return message;
}


int main(int argc,char *argv[])
{
    if(argc!=2)
    {
        USING(argv[0]);
        exit(USING_ERR);
    }

    uint16_t port=atoi(argv[1]);

    unique_ptr<TcpServer>ts(new TcpServer(echo,port));
    ts->InitServer_Start();
    ts->Start();




    return 0;
}

